package client

import (
	"bufio"
	"net/rpc"
	"os"
)

func TestClient() {
	client, err := rpc.Dial("tcp", "127.0.0.1:8888")
	if err != nil {
		panic(err)
	}

	in := bufio.NewReader(os.Stdin)

	for {
		line, _, err := in.ReadLine()
		if err != nil {
			panic(err)
		}
		var reply bool
		err = client.Call("Listerner.GetLine", line, &reply)
		if err != nil {
			panic(err)
		}
	}
}
